home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / FOR-7.BAS < prev    next >
BASIC Source File  |  1991-02-07  |  406b  |  20 lines

  1. ' FOR-7.BAS
  2. ' This program demonstrates nested FOR loops.
  3.  
  4. CLS
  5.  
  6. PRINT "The inner loop will print the colored numbers:"
  7. PRINT
  8.  
  9. FOR i% = 1 TO 15
  10.     COLOR 7             ' set outer loop color to white
  11.     PRINT               ' print a blank line
  12.     PRINT "Outer loop lap number"; i%
  13.     FOR j% = 1 TO 15
  14.         COLOR j%
  15.         PRINT j%;
  16.         SOUND (j% * 300), 1
  17.     NEXT j%
  18. NEXT i%
  19.  
  20.